home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-13 / amac44b.zip / FIL003.QM < prev    next >
Text File  |  1992-05-27  |  9KB  |  194 lines

  1. *                               fil003.qm
  2. *                       Miscellaneous File Macros
  3. *                        Written By Tom Hogshead
  4. *                       [ See FILExx.QM For Use ]
  5. *                                 5/26/92
  6. *
  7. *  Key       Subfile            Description
  8. * =====  ==============  ====================================================
  9. * @f1                    Spell Check WITH backup, Qconfig Backups On or Off ( )
  10. * @f2                    Spell Check WITHOUT backup, Qconfig Backups On or Off
  11. * @f3                    QUIT all files in "Ring"
  12. * @f4                    EXECUTE Dos command from List
  13. * @f5                    EXECUTE Dos command from List With CurrentFileName
  14. * @f6                    EXECUTE DOS command without full path name
  15. * @f7                    Put Colon In Front of Rem Line
  16. *                        For Faster Batch File Operation
  17. * @f6    {e:\up\RING*}   Makes a DIR List in Conventional "8.3" Format,
  18. *                            NO SPACES, With Date And Time, Like This:
  19. *                                FILE25.QM       64795   6-23-91   4:12a
  20. *                            (See RINGxx.QM for this macro)
  21. *
  22. *        {e:\up\FILE*}   Return To FILExx.QM
  23. *
  24. *--eoi
  25.  
  26. *                            M A C R O S
  27. *------------------------------------------------------------
  28. * @(f1) Spell Check Current File WITH Backup With ShareSpell,
  29. *       QCONFIG.DAT backups ON or OFF, SS makes a backup file.
  30. *------------------------------------------------------------
  31. @f1 Macrobegin                              *
  32.     SaveFile                                * Save file
  33.     Dos "SS " CurrentFileName Return Return * Spell Check
  34.     EditFile CurrentFileName Return         * Set EditFile prompt
  35.     NewFile Return                          * Load Spell checked file
  36. *
  37. * 20 bytes Wed  02-13-1991  12:32:29
  38. * 20 bytes Tue  05-26-1992  09:44:28 (TH @f1, changed key from #f3)
  39.  
  40. * 
  41. *-----------------------------------------------------------------
  42. * @(f2) Spell check WITHOUT backup, QCONFIG.DAT backups ON or OFF
  43. *-----------------------------------------------------------------
  44. * This macro does not save a backup file no matter how QCONFIG.DAT is
  45. * configured for backups. If a beep is heard, the file being spell
  46. * checked does not have an extension (no dot was found).
  47.  
  48. @f2 Macrobegin
  49.     Unmarkblock Insertline Begline      * Insert temp line with
  50.     Dropanchor CurrentFileName          * CurrentFileName marked
  51.     Find "." Return "LB" Return         * Find dot backwards in name
  52.     DelToEol ".bak"                     * Add .bak
  53.     Cut Savefile                        * Cut name.bak to scrap/save it
  54.     DOS "SS " CurrentFileName Return Return * ShareSpell spell check
  55.     DOS "DEL " Paste Return Return      * Delete name.bak
  56.     EditFile CurrentFileName Return     * Set EditFile prompt
  57.     NewFile Return                      * Load spell checked file
  58. *
  59. * 56 bytes Sun  02-17-1991  14:02:28
  60. * 56 bytes Tue  05-26-1992  09:45:02 (TH @f2, changed key from #f4)
  61.  
  62. * 
  63. * ----------------------------------------------------------------------
  64. * @(f3) QUITs all Files in Ring
  65. * ----------------------------------------------------------------------
  66. @f3      Macrobegin LOOP: quit jump LOOP
  67. *
  68. * 8 bytes Sat  09-29-1990  00:03:46
  69. * 8 bytes Tue  05-26-1992  09:43:21 (TH @f3, changed key from @q)
  70.  
  71. * 
  72. * ----------------------------------------------------------------------
  73. * @(f4) Execute Dos Commands From List
  74. * ----------------------------------------------------------------------
  75. * To run, just press @f4 and move cursor line to the desired command
  76. * to execute. Then press <enter> to execute command and return to file
  77. * you editing. Modify DOS.LIST as you need.
  78. *
  79. * Run Syntax: [command]  <enter>
  80.  
  81. @f4  Macrobegin
  82.         unmarkblock                     *
  83.         EditFile "DOS.LST" return       * Load command list
  84.      *    pause                           * Select command
  85.         copy                            * Get command to scrap
  86.         quit                            * Quit command list
  87.         DOS paste return                * Execute Dos command
  88. *
  89. * 27 bytes Mon  02-11-1991  11:11:56
  90.  
  91. * 
  92. * ----------------------------------------------------------------------
  93. * @(f5) Execute Dos Commands From List With CurrentFileName
  94. * ----------------------------------------------------------------------
  95. * To run, just press @f5 and move cursor line to the desired command
  96. * to execute. Then press <enter> to execute command. Press <enter> again
  97. * to return to file you were editing. Dos executes the command as if it
  98. * were run at the command line followed by the CurrentFileName, then
  99. * <enter>. Modify the DOS.LIST as you need.
  100.  
  101. * I recall getting this macro from the SemWare BBS but do not recall
  102. * the author. If anyone knows, please let me know so I can give proper
  103. * credit. It's quite a useful and simple macro.
  104.  
  105. * Syntax: [command] CurrentFileName <enter>
  106.  
  107. @f5 Macrobegin
  108.         unmarkblock                     *
  109.         EditFile "DOS.LST" return       * Load command list
  110.      *    pause                           * Select command
  111.         copy                            * Get command to scrap
  112.         quit                            * Quit command list
  113.         DOS paste " " CurrentFileName   * Execute command w/
  114.                                         * CurrentFileName
  115.         return                          *
  116. *
  117. * 30 bytes Sat  09-15-1990  09:24:37
  118.  
  119. * 
  120. * ----------------------------------------------------------------------
  121. * @(f6) Execute DOS Command For Programs Not Requring Full Path Name
  122. * ----------------------------------------------------------------------
  123. @f6 Macrobegin
  124.     Unmarkblock Insertline          * Insert temp line
  125.     CurrentFileName                 * with CurrentFileName
  126.     MarkCharacter                   * Begin mark
  127.     Find "\" Return "B" Return      * Find \ backwards
  128.     CursorRight Cut                 * Cut filename to scrap
  129.     Delline                         * Delete temp line 
  130.     Dos Pause " " Paste Return      * Pause for DOS command
  131. *
  132. * 24 bytes Tue  04-23-1991  11:58:35
  133. * 24 bytes Tue  05-26-1992  09:49:40 (TH @f6, changed key from @f9)
  134.  
  135. * 
  136. * ---------------------------------------------------------------------
  137. * @(f7) Put Colon In Front of Rem Line For Faster Batch File Operation
  138. * ---------------------------------------------------------------------
  139. * "Rem" lines in batch files make batch files run slower.  Lines which
  140. * are labels (colon as first character) do not.  This macro simply puts
  141. * a colon in column 1 for each line containing "rem ".  Each rem line
  142. * for my system takes about 0.2 seconds with disk cache, and 0.5
  143. * seconds per line with no disk cache.  I found one batch file with 30
  144. * plus rem lines - 6 to 15 seconds less running time by labelling rem
  145. * lines!
  146.  
  147. * NOTE:  At least a space and one character of text must follow "rem"
  148. * to be labelled, eg the following would not be labeled:
  149. *       rem
  150. *       echo remember
  151. * The following would be labeled:
  152. *       rem  this is a test
  153. *       echo harem holiday!
  154. *              
  155.  
  156. @f7     MacroBegin
  157.         Begfile InsertLine              * Insert blank line in case
  158.                                         * rem in col/line 1/1
  159.         Editfile "c:\!" Return          * Load temp file
  160.         KillFile Quit                   * To kill/quit it
  161.         EditFile Return                 * Load empty temp file and
  162.         SaveFile                        * save it for append later
  163.         Quit                            * Quit it for now
  164.  START:
  165.         Unmarkblock
  166.         Find "rem " Return "I " Return  * Find "rem "
  167.         Jfalse END                      * No rem lines, end macro
  168.         BegLine                         *ELSE line has rem, go to bol
  169.         Dropanchor Wordright Dropanchor * Mark space up to "rem"
  170.         Shiftright                      * Shift line rt one space
  171.         Begline                         * Bak to bol
  172.         Find ":" Return "L" Return      * See if line has colon at beg
  173.         Jtrue NEXT
  174.         Cursorright ":"                 *ELSE line has no colon, add it!
  175.  NEXT:                                  *
  176.         Shiftleft                       * Shift line back lft one space
  177.         Markline
  178.         WriteBlock Return "A"           * Append line to c:\!
  179.         Endline Cursordown              * Move off rem and chk for last
  180.         Jfalse END
  181.         Cursorup                        *ELSE Line is not last, cur up
  182.         Jump START                      * Loop again
  183.  END:
  184.         Begfile                         * Begin of batch file
  185.         DelLine                         * Delete top blank line
  186.         Editfile Return                 * Load c:\!, look at rem lines
  187.         DelLine KillFile                * with added colon, kill file
  188.         UnMarkBlock                     * Un mark batch file
  189. *
  190. * 82 bytes Mon  03-25-1991  16:49:26
  191. * 82 bytes Tue  05-26-1992  09:45:53 (TH @f7, changed key from ^f7)
  192.  
  193.  
  194.